{
  "cells": [
    {
      "cell_type": "markdown",
      "source": [
        "# Imports"
      ],
      "metadata": {
        "id": "Lc9gNG-SraB9"
      }
    },
    {
      "cell_type": "code",
      "execution_count": null,
      "metadata": {
        "id": "hbWe0j_VKugi"
      },
      "outputs": [],
      "source": [
        "import pandas as pd\n",
        "import nltk\n",
        "from nltk.sentiment.vader import SentimentIntensityAnalyzer"
      ]
    },
    {
      "cell_type": "code",
      "source": [
        "# Download VADER lexicon (if not already downloaded)\n",
        "nltk.download('vader_lexicon')"
      ],
      "metadata": {
        "id": "GQ5lkcJOrJb8",
        "colab": {
          "base_uri": "https://localhost:8080/"
        },
        "outputId": "01b2f4f0-d08d-4276-d031-c950855169ec"
      },
      "execution_count": null,
      "outputs": [
        {
          "output_type": "stream",
          "name": "stderr",
          "text": [
            "[nltk_data] Downloading package vader_lexicon to /root/nltk_data...\n"
          ]
        },
        {
          "output_type": "execute_result",
          "data": {
            "text/plain": [
              "True"
            ]
          },
          "metadata": {},
          "execution_count": 2
        }
      ]
    },
    {
      "cell_type": "code",
      "source": [
        "pd.set_option(\"display.max_columns\", None)"
      ],
      "metadata": {
        "id": "LoM3wyz-OyjL"
      },
      "execution_count": null,
      "outputs": []
    },
    {
      "cell_type": "markdown",
      "source": [
        "# Set up drive and folder"
      ],
      "metadata": {
        "id": "81jPDqaZrVoa"
      }
    },
    {
      "cell_type": "code",
      "execution_count": null,
      "metadata": {
        "colab": {
          "base_uri": "https://localhost:8080/"
        },
        "id": "13FN42p0K8fO",
        "outputId": "f635ec16-2017-4dbf-82b4-e3ce75edcf4f"
      },
      "outputs": [
        {
          "output_type": "stream",
          "name": "stdout",
          "text": [
            "Mounted at /content/drive\n"
          ]
        }
      ],
      "source": [
        "from google.colab import drive\n",
        "drive.mount('/content/drive', force_remount=True)"
      ]
    },
    {
      "cell_type": "code",
      "execution_count": null,
      "metadata": {
        "colab": {
          "base_uri": "https://localhost:8080/"
        },
        "id": "F4c9RXSALCzY",
        "outputId": "fdbacf4c-2317-49d9-94c8-8689e2a43b07"
      },
      "outputs": [
        {
          "output_type": "stream",
          "name": "stdout",
          "text": [
            "/content/drive/MyDrive/weimar_films_datasets\n"
          ]
        }
      ],
      "source": [
        "# Change to folder location of the corpus file\n",
        "%cd /content/drive/MyDrive/weimar_films_datasets/"
      ]
    },
    {
      "cell_type": "markdown",
      "metadata": {
        "id": "lwX113THObVI"
      },
      "source": [
        "# Direct sentiment analysis of the reviews with VADER lexicon"
      ]
    },
    {
      "cell_type": "code",
      "execution_count": null,
      "metadata": {
        "id": "5CpHT9v-MWox"
      },
      "outputs": [],
      "source": [
        "# Load the Excel table into a pandas DataFrame\n",
        "df = pd.read_excel('Reviews Corpus.xlsx', index_col=[0])\n",
        "\n",
        "# Initialize the VADER sentiment analyzer\n",
        "sid = SentimentIntensityAnalyzer()\n",
        "\n",
        "# Function to get compound score\n",
        "def get_compound_score(text):\n",
        "    scores = sid.polarity_scores(text)\n",
        "    return scores['compound']\n",
        "\n",
        "# Function to determine sentiment\n",
        "def get_sentiment(text):\n",
        "    scores = sid.polarity_scores(text)\n",
        "    if scores['compound'] > 0.2:\n",
        "        return 'positive'\n",
        "    elif scores['compound'] < -0.2:\n",
        "        return 'negative'\n",
        "    else:\n",
        "        return 'mixed'\n",
        "\n",
        "# Apply sentiment analysis to the 'Review_Eng' column and create new columns for sentiment score and positive/mixed/negative of the reviews\n",
        "df['VADER_review_score'] = df['Review_Eng'].apply(get_compound_score)\n",
        "df['VADER_review_sentiment'] = df['Review_Eng'].apply(get_sentiment)"
      ]
    },
    {
      "cell_type": "markdown",
      "source": [
        "# Sentiment analysis of the ChatGPT review analyses"
      ],
      "metadata": {
        "id": "1GX-DValGoag"
      }
    },
    {
      "cell_type": "code",
      "source": [
        "# Apply sentiment analysis to the 'ChatGPT API Answers' column and and create new columns for sentiment score and positive/mixed/negative of the outputs\n",
        "df['VADER_ChatGPT_score'] = df['ChatGPT API Answers'].apply(get_compound_score)\n",
        "df['VADER_ChatGPT_sentiment'] = df['ChatGPT API Answers'].apply(get_sentiment)"
      ],
      "metadata": {
        "id": "h2U_rLnCGn9z"
      },
      "execution_count": null,
      "outputs": []
    },
    {
      "cell_type": "code",
      "source": [
        "df"
      ],
      "metadata": {
        "colab": {
          "base_uri": "https://localhost:8080/",
          "height": 1000
        },
        "id": "zyQRLY8jJ8vh",
        "outputId": "657ecaae-b114-4300-acc6-abf2bb801448"
      },
      "execution_count": null,
      "outputs": [
        {
          "output_type": "execute_result",
          "data": {
            "text/plain": [
              "              Movie        Item Type  Publication Year                Author  \\\n",
              "ID                                                                             \n",
              "2MBUUSRR   Caligari  magazineArticle              1921             Anonymous   \n",
              "MXZKVQ6B   Caligari  magazineArticle              1922        Landry, Lionel   \n",
              "DPRVUI8Q   Caligari  magazineArticle              1924             Anonymous   \n",
              "G2XQWE7E   Caligari  magazineArticle              1922             Anonymous   \n",
              "LU2I7PCZ   Caligari  magazineArticle              1920  Beßmertny, Alexander   \n",
              "...             ...              ...               ...                   ...   \n",
              "2SQ2YDPA  Nosferatu  magazineArticle              1922             Anonymous   \n",
              "KWC9KUTP  Nosferatu  magazineArticle              1922      Trask, C. Hooper   \n",
              "LDB96ADR  Nosferatu  magazineArticle              1922       Brauner, Ludwig   \n",
              "SBML59AF  Nosferatu  magazineArticle              1922                    ej   \n",
              "L7JBS7LN  Nosferatu  magazineArticle              1931           Blin, Roger   \n",
              "\n",
              "                                          Title             Publication Title  \\\n",
              "ID                                                                              \n",
              "2MBUUSRR    Review: The Cabinet of Dr. Caligari      Exhibitor's Trade Review   \n",
              "MXZKVQ6B  Caligarisme ou La Revanche du Théatre                         Cinéa   \n",
              "DPRVUI8Q                        Our Honors List  Pictures and the Picturegoer   \n",
              "G2XQWE7E         Le Cabinet du Docteur Caligari                         Cinéa   \n",
              "LU2I7PCZ           Ein expressionistischer Film          Die Neue Schaubühne    \n",
              "...                                         ...                           ...   \n",
              "2SQ2YDPA       Bezirks-Urauffà¼hrungen im Reich             Der Kinematograph   \n",
              "KWC9KUTP                       Berlin Film News                       Variety   \n",
              "LDB96ADR                 Berliner Filmneuheiten             Der Kinematograph   \n",
              "SBML59AF                              Nosferatu             Vossische Zeitung   \n",
              "L7JBS7LN                           F. W. MURNAU            La Revue du Cinéma   \n",
              "\n",
              "                   Publication Type  \\\n",
              "ID                                    \n",
              "2MBUUSRR              Trade Journal   \n",
              "MXZKVQ6B                  Criticism   \n",
              "DPRVUI8Q               Fan Magazine   \n",
              "G2XQWE7E                  Criticism   \n",
              "LU2I7PCZ                  Criticism   \n",
              "...                             ...   \n",
              "2SQ2YDPA              Trade Journal   \n",
              "KWC9KUTP              Trade Journal   \n",
              "LDB96ADR              Trade Journal   \n",
              "SBML59AF  Newspaper/ News  magazine   \n",
              "L7JBS7LN                  Criticism   \n",
              "\n",
              "                                                        Url          Origin  \\\n",
              "ID                                                                            \n",
              "2MBUUSRR  https://lantern.mediahist.org/catalog/exhibito...            MHDL   \n",
              "MXZKVQ6B              http://archive.org/details/cina22pari            MHDL   \n",
              "DPRVUI8Q  https://lantern.mediahist.org/catalog/pictu78o...            MHDL   \n",
              "G2XQWE7E  https://lantern.mediahist.org/catalog/cina22pa...            MHDL   \n",
              "LU2I7PCZ                                  filmhistoriker.de  filmhistoriker   \n",
              "...                                                     ...             ...   \n",
              "2SQ2YDPA  https://lantern.mediahist.org/catalog/kinemato...            MHDL   \n",
              "KWC9KUTP  https://lantern.mediahist.org/catalog/variety6...            MHDL   \n",
              "LDB96ADR  https://lantern.mediahist.org/catalog/kinemato...            MHDL   \n",
              "SBML59AF  https://www.filmportal.de/node/3737/material/6...      filmportal   \n",
              "L7JBS7LN  https://archive.org/details/larevueducinema103...            MHDL   \n",
              "\n",
              "                Date Country Language  \\\n",
              "ID                                      \n",
              "2MBUUSRR  09/04/1921     USA  English   \n",
              "MXZKVQ6B  28/04/1922     FRA   French   \n",
              "DPRVUI8Q     1924-01     GBR  English   \n",
              "G2XQWE7E        1922     FRA   French   \n",
              "LU2I7PCZ  05/05/1920     DEU   German   \n",
              "...              ...     ...      ...   \n",
              "2SQ2YDPA     1922-08     DEU   German   \n",
              "KWC9KUTP  21/04/1922     USA  English   \n",
              "LDB96ADR     1922-03     DEU   German   \n",
              "SBML59AF  07/03/1922     DEU   German   \n",
              "L7JBS7LN  01/08/1931     FRA   French   \n",
              "\n",
              "                                                     Review  \\\n",
              "ID                                                            \n",
              "2MBUUSRR  This is an extremely gruseome melodrama, enact...   \n",
              "MXZKVQ6B  Je me doutais bien, lorsque nous fut rèvélé le...   \n",
              "DPRVUI8Q  It's a good New Year that begins with two such...   \n",
              "G2XQWE7E  Au moment où \"Le Docteur Caligari\" va être rév...   \n",
              "LU2I7PCZ  Was heißt hier (und wo anders) expressionistis...   \n",
              "...                                                     ...   \n",
              "2SQ2YDPA  Der aufstrebende Filmverleih Schneider u. Schw...   \n",
              "KWC9KUTP  The film itself, now playing at the newly open...   \n",
              "LDB96ADR  Auf der Suche nach einem packenden Filmanuskri...   \n",
              "SBML59AF  Das ist Film: gespensterische Kutschen huschen...   \n",
              "L7JBS7LN  C'est ainssi que d'une vieille légende alleman...   \n",
              "\n",
              "                                                 Review_Eng Manual Judgment  \\\n",
              "ID                                                                            \n",
              "2MBUUSRR  This is an extremely gruesome melodrama, enact...        positive   \n",
              "MXZKVQ6B  When Robert Wiene's remarkable film was unveil...        negative   \n",
              "DPRVUI8Q  It's a good New Year that begins with two such...        positive   \n",
              "G2XQWE7E  At a time when \"Le Docteur Caligari\" is about ...        positive   \n",
              "LU2I7PCZ  What does expressionist mean here (and elsewhe...        negative   \n",
              "...                                                     ...             ...   \n",
              "2SQ2YDPA  The up-and-coming film distributor Schneider u...           mixed   \n",
              "KWC9KUTP  The film itself, now playing at the newly open...        negative   \n",
              "LDB96ADR  In its search for a gripping film script, the ...        positive   \n",
              "SBML59AF  This is film: ghostly carriages scurry through...        positive   \n",
              "L7JBS7LN  And so, from an old German legend that it was ...        positive   \n",
              "\n",
              "         Binary GPT-assisted Judgment  \\\n",
              "ID                                      \n",
              "2MBUUSRR                     positive   \n",
              "MXZKVQ6B                     negative   \n",
              "DPRVUI8Q                     positive   \n",
              "G2XQWE7E                     positive   \n",
              "LU2I7PCZ                     negative   \n",
              "...                               ...   \n",
              "2SQ2YDPA                     positive   \n",
              "KWC9KUTP                     negative   \n",
              "LDB96ADR                     positive   \n",
              "SBML59AF                     positive   \n",
              "L7JBS7LN                     positive   \n",
              "\n",
              "                                     ChatGPT Binary Answers  \\\n",
              "ID                                                            \n",
              "2MBUUSRR                                                NaN   \n",
              "MXZKVQ6B                                                NaN   \n",
              "DPRVUI8Q                                                NaN   \n",
              "G2XQWE7E                                                NaN   \n",
              "LU2I7PCZ                                                NaN   \n",
              "...                                                     ...   \n",
              "2SQ2YDPA  \\nThe film review seems to be mostly positive ...   \n",
              "KWC9KUTP                                                NaN   \n",
              "LDB96ADR                                                NaN   \n",
              "SBML59AF                                                NaN   \n",
              "L7JBS7LN                                                NaN   \n",
              "\n",
              "                                        ChatGPT API Answers  \\\n",
              "ID                                                            \n",
              "2MBUUSRR  This film review can be considered positive. T...   \n",
              "MXZKVQ6B  Based on the language used in the review, it i...   \n",
              "DPRVUI8Q  The film review is positive. The reviewer begi...   \n",
              "G2XQWE7E  Based on the review, it can be inferred that t...   \n",
              "LU2I7PCZ  This film review appears to be negative. The r...   \n",
              "...                                                     ...   \n",
              "2SQ2YDPA  This film review can be considered positive. T...   \n",
              "KWC9KUTP  Based on the review, it can be inferred that t...   \n",
              "LDB96ADR  Based on the wording and tone of the review, i...   \n",
              "SBML59AF  Based on the language used and the overall ton...   \n",
              "L7JBS7LN  Based on the given review, it is a positive re...   \n",
              "\n",
              "                                    HuggingChat API Answers  \\\n",
              "ID                                                            \n",
              "2MBUUSRR  The tone of this film review can be characteri...   \n",
              "MXZKVQ6B  In summary, the author argues that the use of ...   \n",
              "DPRVUI8Q  I am sorry, but I cannot fulfill your request ...   \n",
              "G2XQWE7E  This film review appears to be very positive o...   \n",
              "LU2I7PCZ  In summary, the author argues that the film 'T...   \n",
              "...                                                     ...   \n",
              "2SQ2YDPA  This film review appears to be mixed or neutra...   \n",
              "KWC9KUTP  This film review can be characterized as mixed...   \n",
              "LDB96ADR  This film review appears to be mixed or neutra...   \n",
              "SBML59AF  The tone of this film review appears to be mix...   \n",
              "L7JBS7LN  The overall sentiment of this film review seem...   \n",
              "\n",
              "          VADER_review_score VADER_review_sentiment  VADER_ChatGPT_score  \\\n",
              "ID                                                                         \n",
              "2MBUUSRR              0.2960               positive               0.9750   \n",
              "MXZKVQ6B              0.9975               positive              -0.6103   \n",
              "DPRVUI8Q              0.9970               positive               0.9856   \n",
              "G2XQWE7E             -0.5387               negative               0.9842   \n",
              "LU2I7PCZ              0.2709               positive              -0.9169   \n",
              "...                      ...                    ...                  ...   \n",
              "2SQ2YDPA             -0.9802               negative               0.7394   \n",
              "KWC9KUTP              0.9941               positive              -0.7555   \n",
              "LDB96ADR              0.9872               positive               0.9451   \n",
              "SBML59AF              0.3400               positive               0.9169   \n",
              "L7JBS7LN             -0.9692               negative               0.9433   \n",
              "\n",
              "         VADER_ChatGPT_sentiment  \n",
              "ID                                \n",
              "2MBUUSRR                positive  \n",
              "MXZKVQ6B                negative  \n",
              "DPRVUI8Q                positive  \n",
              "G2XQWE7E                positive  \n",
              "LU2I7PCZ                negative  \n",
              "...                          ...  \n",
              "2SQ2YDPA                positive  \n",
              "KWC9KUTP                negative  \n",
              "LDB96ADR                positive  \n",
              "SBML59AF                positive  \n",
              "L7JBS7LN                positive  \n",
              "\n",
              "[80 rows x 23 columns]"
            ],
            "text/html": [
              "\n",
              "  <div id=\"df-e2f22474-6528-4882-94e1-32c2ca410c9a\" class=\"colab-df-container\">\n",
              "    <div>\n",
              "<style scoped>\n",
              "    .dataframe tbody tr th:only-of-type {\n",
              "        vertical-align: middle;\n",
              "    }\n",
              "\n",
              "    .dataframe tbody tr th {\n",
              "        vertical-align: top;\n",
              "    }\n",
              "\n",
              "    .dataframe thead th {\n",
              "        text-align: right;\n",
              "    }\n",
              "</style>\n",
              "<table border=\"1\" class=\"dataframe\">\n",
              "  <thead>\n",
              "    <tr style=\"text-align: right;\">\n",
              "      <th></th>\n",
              "      <th>Movie</th>\n",
              "      <th>Item Type</th>\n",
              "      <th>Publication Year</th>\n",
              "      <th>Author</th>\n",
              "      <th>Title</th>\n",
              "      <th>Publication Title</th>\n",
              "      <th>Publication Type</th>\n",
              "      <th>Url</th>\n",
              "      <th>Origin</th>\n",
              "      <th>Date</th>\n",
              "      <th>Country</th>\n",
              "      <th>Language</th>\n",
              "      <th>Review</th>\n",
              "      <th>Review_Eng</th>\n",
              "      <th>Manual Judgment</th>\n",
              "      <th>Binary GPT-assisted Judgment</th>\n",
              "      <th>ChatGPT Binary Answers</th>\n",
              "      <th>ChatGPT API Answers</th>\n",
              "      <th>HuggingChat API Answers</th>\n",
              "      <th>VADER_review_score</th>\n",
              "      <th>VADER_review_sentiment</th>\n",
              "      <th>VADER_ChatGPT_score</th>\n",
              "      <th>VADER_ChatGPT_sentiment</th>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>ID</th>\n",
              "      <th></th>\n",
              "      <th></th>\n",
              "      <th></th>\n",
              "      <th></th>\n",
              "      <th></th>\n",
              "      <th></th>\n",
              "      <th></th>\n",
              "      <th></th>\n",
              "      <th></th>\n",
              "      <th></th>\n",
              "      <th></th>\n",
              "      <th></th>\n",
              "      <th></th>\n",
              "      <th></th>\n",
              "      <th></th>\n",
              "      <th></th>\n",
              "      <th></th>\n",
              "      <th></th>\n",
              "      <th></th>\n",
              "      <th></th>\n",
              "      <th></th>\n",
              "      <th></th>\n",
              "      <th></th>\n",
              "    </tr>\n",
              "  </thead>\n",
              "  <tbody>\n",
              "    <tr>\n",
              "      <th>2MBUUSRR</th>\n",
              "      <td>Caligari</td>\n",
              "      <td>magazineArticle</td>\n",
              "      <td>1921</td>\n",
              "      <td>Anonymous</td>\n",
              "      <td>Review: The Cabinet of Dr. Caligari</td>\n",
              "      <td>Exhibitor's Trade Review</td>\n",
              "      <td>Trade Journal</td>\n",
              "      <td>https://lantern.mediahist.org/catalog/exhibito...</td>\n",
              "      <td>MHDL</td>\n",
              "      <td>09/04/1921</td>\n",
              "      <td>USA</td>\n",
              "      <td>English</td>\n",
              "      <td>This is an extremely gruseome melodrama, enact...</td>\n",
              "      <td>This is an extremely gruesome melodrama, enact...</td>\n",
              "      <td>positive</td>\n",
              "      <td>positive</td>\n",
              "      <td>NaN</td>\n",
              "      <td>This film review can be considered positive. T...</td>\n",
              "      <td>The tone of this film review can be characteri...</td>\n",
              "      <td>0.2960</td>\n",
              "      <td>positive</td>\n",
              "      <td>0.9750</td>\n",
              "      <td>positive</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>MXZKVQ6B</th>\n",
              "      <td>Caligari</td>\n",
              "      <td>magazineArticle</td>\n",
              "      <td>1922</td>\n",
              "      <td>Landry, Lionel</td>\n",
              "      <td>Caligarisme ou La Revanche du Théatre</td>\n",
              "      <td>Cinéa</td>\n",
              "      <td>Criticism</td>\n",
              "      <td>http://archive.org/details/cina22pari</td>\n",
              "      <td>MHDL</td>\n",
              "      <td>28/04/1922</td>\n",
              "      <td>FRA</td>\n",
              "      <td>French</td>\n",
              "      <td>Je me doutais bien, lorsque nous fut rèvélé le...</td>\n",
              "      <td>When Robert Wiene's remarkable film was unveil...</td>\n",
              "      <td>negative</td>\n",
              "      <td>negative</td>\n",
              "      <td>NaN</td>\n",
              "      <td>Based on the language used in the review, it i...</td>\n",
              "      <td>In summary, the author argues that the use of ...</td>\n",
              "      <td>0.9975</td>\n",
              "      <td>positive</td>\n",
              "      <td>-0.6103</td>\n",
              "      <td>negative</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>DPRVUI8Q</th>\n",
              "      <td>Caligari</td>\n",
              "      <td>magazineArticle</td>\n",
              "      <td>1924</td>\n",
              "      <td>Anonymous</td>\n",
              "      <td>Our Honors List</td>\n",
              "      <td>Pictures and the Picturegoer</td>\n",
              "      <td>Fan Magazine</td>\n",
              "      <td>https://lantern.mediahist.org/catalog/pictu78o...</td>\n",
              "      <td>MHDL</td>\n",
              "      <td>1924-01</td>\n",
              "      <td>GBR</td>\n",
              "      <td>English</td>\n",
              "      <td>It's a good New Year that begins with two such...</td>\n",
              "      <td>It's a good New Year that begins with two such...</td>\n",
              "      <td>positive</td>\n",
              "      <td>positive</td>\n",
              "      <td>NaN</td>\n",
              "      <td>The film review is positive. The reviewer begi...</td>\n",
              "      <td>I am sorry, but I cannot fulfill your request ...</td>\n",
              "      <td>0.9970</td>\n",
              "      <td>positive</td>\n",
              "      <td>0.9856</td>\n",
              "      <td>positive</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>G2XQWE7E</th>\n",
              "      <td>Caligari</td>\n",
              "      <td>magazineArticle</td>\n",
              "      <td>1922</td>\n",
              "      <td>Anonymous</td>\n",
              "      <td>Le Cabinet du Docteur Caligari</td>\n",
              "      <td>Cinéa</td>\n",
              "      <td>Criticism</td>\n",
              "      <td>https://lantern.mediahist.org/catalog/cina22pa...</td>\n",
              "      <td>MHDL</td>\n",
              "      <td>1922</td>\n",
              "      <td>FRA</td>\n",
              "      <td>French</td>\n",
              "      <td>Au moment où \"Le Docteur Caligari\" va être rév...</td>\n",
              "      <td>At a time when \"Le Docteur Caligari\" is about ...</td>\n",
              "      <td>positive</td>\n",
              "      <td>positive</td>\n",
              "      <td>NaN</td>\n",
              "      <td>Based on the review, it can be inferred that t...</td>\n",
              "      <td>This film review appears to be very positive o...</td>\n",
              "      <td>-0.5387</td>\n",
              "      <td>negative</td>\n",
              "      <td>0.9842</td>\n",
              "      <td>positive</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>LU2I7PCZ</th>\n",
              "      <td>Caligari</td>\n",
              "      <td>magazineArticle</td>\n",
              "      <td>1920</td>\n",
              "      <td>Beßmertny, Alexander</td>\n",
              "      <td>Ein expressionistischer Film</td>\n",
              "      <td>Die Neue Schaubühne</td>\n",
              "      <td>Criticism</td>\n",
              "      <td>filmhistoriker.de</td>\n",
              "      <td>filmhistoriker</td>\n",
              "      <td>05/05/1920</td>\n",
              "      <td>DEU</td>\n",
              "      <td>German</td>\n",
              "      <td>Was heißt hier (und wo anders) expressionistis...</td>\n",
              "      <td>What does expressionist mean here (and elsewhe...</td>\n",
              "      <td>negative</td>\n",
              "      <td>negative</td>\n",
              "      <td>NaN</td>\n",
              "      <td>This film review appears to be negative. The r...</td>\n",
              "      <td>In summary, the author argues that the film 'T...</td>\n",
              "      <td>0.2709</td>\n",
              "      <td>positive</td>\n",
              "      <td>-0.9169</td>\n",
              "      <td>negative</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>...</th>\n",
              "      <td>...</td>\n",
              "      <td>...</td>\n",
              "      <td>...</td>\n",
              "      <td>...</td>\n",
              "      <td>...</td>\n",
              "      <td>...</td>\n",
              "      <td>...</td>\n",
              "      <td>...</td>\n",
              "      <td>...</td>\n",
              "      <td>...</td>\n",
              "      <td>...</td>\n",
              "      <td>...</td>\n",
              "      <td>...</td>\n",
              "      <td>...</td>\n",
              "      <td>...</td>\n",
              "      <td>...</td>\n",
              "      <td>...</td>\n",
              "      <td>...</td>\n",
              "      <td>...</td>\n",
              "      <td>...</td>\n",
              "      <td>...</td>\n",
              "      <td>...</td>\n",
              "      <td>...</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>2SQ2YDPA</th>\n",
              "      <td>Nosferatu</td>\n",
              "      <td>magazineArticle</td>\n",
              "      <td>1922</td>\n",
              "      <td>Anonymous</td>\n",
              "      <td>Bezirks-Urauffà¼hrungen im Reich</td>\n",
              "      <td>Der Kinematograph</td>\n",
              "      <td>Trade Journal</td>\n",
              "      <td>https://lantern.mediahist.org/catalog/kinemato...</td>\n",
              "      <td>MHDL</td>\n",
              "      <td>1922-08</td>\n",
              "      <td>DEU</td>\n",
              "      <td>German</td>\n",
              "      <td>Der aufstrebende Filmverleih Schneider u. Schw...</td>\n",
              "      <td>The up-and-coming film distributor Schneider u...</td>\n",
              "      <td>mixed</td>\n",
              "      <td>positive</td>\n",
              "      <td>\\nThe film review seems to be mostly positive ...</td>\n",
              "      <td>This film review can be considered positive. T...</td>\n",
              "      <td>This film review appears to be mixed or neutra...</td>\n",
              "      <td>-0.9802</td>\n",
              "      <td>negative</td>\n",
              "      <td>0.7394</td>\n",
              "      <td>positive</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>KWC9KUTP</th>\n",
              "      <td>Nosferatu</td>\n",
              "      <td>magazineArticle</td>\n",
              "      <td>1922</td>\n",
              "      <td>Trask, C. Hooper</td>\n",
              "      <td>Berlin Film News</td>\n",
              "      <td>Variety</td>\n",
              "      <td>Trade Journal</td>\n",
              "      <td>https://lantern.mediahist.org/catalog/variety6...</td>\n",
              "      <td>MHDL</td>\n",
              "      <td>21/04/1922</td>\n",
              "      <td>USA</td>\n",
              "      <td>English</td>\n",
              "      <td>The film itself, now playing at the newly open...</td>\n",
              "      <td>The film itself, now playing at the newly open...</td>\n",
              "      <td>negative</td>\n",
              "      <td>negative</td>\n",
              "      <td>NaN</td>\n",
              "      <td>Based on the review, it can be inferred that t...</td>\n",
              "      <td>This film review can be characterized as mixed...</td>\n",
              "      <td>0.9941</td>\n",
              "      <td>positive</td>\n",
              "      <td>-0.7555</td>\n",
              "      <td>negative</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>LDB96ADR</th>\n",
              "      <td>Nosferatu</td>\n",
              "      <td>magazineArticle</td>\n",
              "      <td>1922</td>\n",
              "      <td>Brauner, Ludwig</td>\n",
              "      <td>Berliner Filmneuheiten</td>\n",
              "      <td>Der Kinematograph</td>\n",
              "      <td>Trade Journal</td>\n",
              "      <td>https://lantern.mediahist.org/catalog/kinemato...</td>\n",
              "      <td>MHDL</td>\n",
              "      <td>1922-03</td>\n",
              "      <td>DEU</td>\n",
              "      <td>German</td>\n",
              "      <td>Auf der Suche nach einem packenden Filmanuskri...</td>\n",
              "      <td>In its search for a gripping film script, the ...</td>\n",
              "      <td>positive</td>\n",
              "      <td>positive</td>\n",
              "      <td>NaN</td>\n",
              "      <td>Based on the wording and tone of the review, i...</td>\n",
              "      <td>This film review appears to be mixed or neutra...</td>\n",
              "      <td>0.9872</td>\n",
              "      <td>positive</td>\n",
              "      <td>0.9451</td>\n",
              "      <td>positive</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>SBML59AF</th>\n",
              "      <td>Nosferatu</td>\n",
              "      <td>magazineArticle</td>\n",
              "      <td>1922</td>\n",
              "      <td>ej</td>\n",
              "      <td>Nosferatu</td>\n",
              "      <td>Vossische Zeitung</td>\n",
              "      <td>Newspaper/ News  magazine</td>\n",
              "      <td>https://www.filmportal.de/node/3737/material/6...</td>\n",
              "      <td>filmportal</td>\n",
              "      <td>07/03/1922</td>\n",
              "      <td>DEU</td>\n",
              "      <td>German</td>\n",
              "      <td>Das ist Film: gespensterische Kutschen huschen...</td>\n",
              "      <td>This is film: ghostly carriages scurry through...</td>\n",
              "      <td>positive</td>\n",
              "      <td>positive</td>\n",
              "      <td>NaN</td>\n",
              "      <td>Based on the language used and the overall ton...</td>\n",
              "      <td>The tone of this film review appears to be mix...</td>\n",
              "      <td>0.3400</td>\n",
              "      <td>positive</td>\n",
              "      <td>0.9169</td>\n",
              "      <td>positive</td>\n",
              "    </tr>\n",
              "    <tr>\n",
              "      <th>L7JBS7LN</th>\n",
              "      <td>Nosferatu</td>\n",
              "      <td>magazineArticle</td>\n",
              "      <td>1931</td>\n",
              "      <td>Blin, Roger</td>\n",
              "      <td>F. W. MURNAU</td>\n",
              "      <td>La Revue du Cinéma</td>\n",
              "      <td>Criticism</td>\n",
              "      <td>https://archive.org/details/larevueducinema103...</td>\n",
              "      <td>MHDL</td>\n",
              "      <td>01/08/1931</td>\n",
              "      <td>FRA</td>\n",
              "      <td>French</td>\n",
              "      <td>C'est ainssi que d'une vieille légende alleman...</td>\n",
              "      <td>And so, from an old German legend that it was ...</td>\n",
              "      <td>positive</td>\n",
              "      <td>positive</td>\n",
              "      <td>NaN</td>\n",
              "      <td>Based on the given review, it is a positive re...</td>\n",
              "      <td>The overall sentiment of this film review seem...</td>\n",
              "      <td>-0.9692</td>\n",
              "      <td>negative</td>\n",
              "      <td>0.9433</td>\n",
              "      <td>positive</td>\n",
              "    </tr>\n",
              "  </tbody>\n",
              "</table>\n",
              "<p>80 rows × 23 columns</p>\n",
              "</div>\n",
              "    <div class=\"colab-df-buttons\">\n",
              "\n",
              "  <div class=\"colab-df-container\">\n",
              "    <button class=\"colab-df-convert\" onclick=\"convertToInteractive('df-e2f22474-6528-4882-94e1-32c2ca410c9a')\"\n",
              "            title=\"Convert this dataframe to an interactive table.\"\n",
              "            style=\"display:none;\">\n",
              "\n",
              "  <svg xmlns=\"http://www.w3.org/2000/svg\" height=\"24px\" viewBox=\"0 -960 960 960\">\n",
              "    <path d=\"M120-120v-720h720v720H120Zm60-500h600v-160H180v160Zm220 220h160v-160H400v160Zm0 220h160v-160H400v160ZM180-400h160v-160H180v160Zm440 0h160v-160H620v160ZM180-180h160v-160H180v160Zm440 0h160v-160H620v160Z\"/>\n",
              "  </svg>\n",
              "    </button>\n",
              "\n",
              "  <style>\n",
              "    .colab-df-container {\n",
              "      display:flex;\n",
              "      gap: 12px;\n",
              "    }\n",
              "\n",
              "    .colab-df-convert {\n",
              "      background-color: #E8F0FE;\n",
              "      border: none;\n",
              "      border-radius: 50%;\n",
              "      cursor: pointer;\n",
              "      display: none;\n",
              "      fill: #1967D2;\n",
              "      height: 32px;\n",
              "      padding: 0 0 0 0;\n",
              "      width: 32px;\n",
              "    }\n",
              "\n",
              "    .colab-df-convert:hover {\n",
              "      background-color: #E2EBFA;\n",
              "      box-shadow: 0px 1px 2px rgba(60, 64, 67, 0.3), 0px 1px 3px 1px rgba(60, 64, 67, 0.15);\n",
              "      fill: #174EA6;\n",
              "    }\n",
              "\n",
              "    .colab-df-buttons div {\n",
              "      margin-bottom: 4px;\n",
              "    }\n",
              "\n",
              "    [theme=dark] .colab-df-convert {\n",
              "      background-color: #3B4455;\n",
              "      fill: #D2E3FC;\n",
              "    }\n",
              "\n",
              "    [theme=dark] .colab-df-convert:hover {\n",
              "      background-color: #434B5C;\n",
              "      box-shadow: 0px 1px 3px 1px rgba(0, 0, 0, 0.15);\n",
              "      filter: drop-shadow(0px 1px 2px rgba(0, 0, 0, 0.3));\n",
              "      fill: #FFFFFF;\n",
              "    }\n",
              "  </style>\n",
              "\n",
              "    <script>\n",
              "      const buttonEl =\n",
              "        document.querySelector('#df-e2f22474-6528-4882-94e1-32c2ca410c9a button.colab-df-convert');\n",
              "      buttonEl.style.display =\n",
              "        google.colab.kernel.accessAllowed ? 'block' : 'none';\n",
              "\n",
              "      async function convertToInteractive(key) {\n",
              "        const element = document.querySelector('#df-e2f22474-6528-4882-94e1-32c2ca410c9a');\n",
              "        const dataTable =\n",
              "          await google.colab.kernel.invokeFunction('convertToInteractive',\n",
              "                                                    [key], {});\n",
              "        if (!dataTable) return;\n",
              "\n",
              "        const docLinkHtml = 'Like what you see? Visit the ' +\n",
              "          '<a target=\"_blank\" href=https://colab.research.google.com/notebooks/data_table.ipynb>data table notebook</a>'\n",
              "          + ' to learn more about interactive tables.';\n",
              "        element.innerHTML = '';\n",
              "        dataTable['output_type'] = 'display_data';\n",
              "        await google.colab.output.renderOutput(dataTable, element);\n",
              "        const docLink = document.createElement('div');\n",
              "        docLink.innerHTML = docLinkHtml;\n",
              "        element.appendChild(docLink);\n",
              "      }\n",
              "    </script>\n",
              "  </div>\n",
              "\n",
              "\n",
              "<div id=\"df-e3ab1df2-9ffc-4098-ab26-12571e6ac5af\">\n",
              "  <button class=\"colab-df-quickchart\" onclick=\"quickchart('df-e3ab1df2-9ffc-4098-ab26-12571e6ac5af')\"\n",
              "            title=\"Suggest charts.\"\n",
              "            style=\"display:none;\">\n",
              "\n",
              "<svg xmlns=\"http://www.w3.org/2000/svg\" height=\"24px\"viewBox=\"0 0 24 24\"\n",
              "     width=\"24px\">\n",
              "    <g>\n",
              "        <path d=\"M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zM9 17H7v-7h2v7zm4 0h-2V7h2v10zm4 0h-2v-4h2v4z\"/>\n",
              "    </g>\n",
              "</svg>\n",
              "  </button>\n",
              "\n",
              "<style>\n",
              "  .colab-df-quickchart {\n",
              "      --bg-color: #E8F0FE;\n",
              "      --fill-color: #1967D2;\n",
              "      --hover-bg-color: #E2EBFA;\n",
              "      --hover-fill-color: #174EA6;\n",
              "      --disabled-fill-color: #AAA;\n",
              "      --disabled-bg-color: #DDD;\n",
              "  }\n",
              "\n",
              "  [theme=dark] .colab-df-quickchart {\n",
              "      --bg-color: #3B4455;\n",
              "      --fill-color: #D2E3FC;\n",
              "      --hover-bg-color: #434B5C;\n",
              "      --hover-fill-color: #FFFFFF;\n",
              "      --disabled-bg-color: #3B4455;\n",
              "      --disabled-fill-color: #666;\n",
              "  }\n",
              "\n",
              "  .colab-df-quickchart {\n",
              "    background-color: var(--bg-color);\n",
              "    border: none;\n",
              "    border-radius: 50%;\n",
              "    cursor: pointer;\n",
              "    display: none;\n",
              "    fill: var(--fill-color);\n",
              "    height: 32px;\n",
              "    padding: 0;\n",
              "    width: 32px;\n",
              "  }\n",
              "\n",
              "  .colab-df-quickchart:hover {\n",
              "    background-color: var(--hover-bg-color);\n",
              "    box-shadow: 0 1px 2px rgba(60, 64, 67, 0.3), 0 1px 3px 1px rgba(60, 64, 67, 0.15);\n",
              "    fill: var(--button-hover-fill-color);\n",
              "  }\n",
              "\n",
              "  .colab-df-quickchart-complete:disabled,\n",
              "  .colab-df-quickchart-complete:disabled:hover {\n",
              "    background-color: var(--disabled-bg-color);\n",
              "    fill: var(--disabled-fill-color);\n",
              "    box-shadow: none;\n",
              "  }\n",
              "\n",
              "  .colab-df-spinner {\n",
              "    border: 2px solid var(--fill-color);\n",
              "    border-color: transparent;\n",
              "    border-bottom-color: var(--fill-color);\n",
              "    animation:\n",
              "      spin 1s steps(1) infinite;\n",
              "  }\n",
              "\n",
              "  @keyframes spin {\n",
              "    0% {\n",
              "      border-color: transparent;\n",
              "      border-bottom-color: var(--fill-color);\n",
              "      border-left-color: var(--fill-color);\n",
              "    }\n",
              "    20% {\n",
              "      border-color: transparent;\n",
              "      border-left-color: var(--fill-color);\n",
              "      border-top-color: var(--fill-color);\n",
              "    }\n",
              "    30% {\n",
              "      border-color: transparent;\n",
              "      border-left-color: var(--fill-color);\n",
              "      border-top-color: var(--fill-color);\n",
              "      border-right-color: var(--fill-color);\n",
              "    }\n",
              "    40% {\n",
              "      border-color: transparent;\n",
              "      border-right-color: var(--fill-color);\n",
              "      border-top-color: var(--fill-color);\n",
              "    }\n",
              "    60% {\n",
              "      border-color: transparent;\n",
              "      border-right-color: var(--fill-color);\n",
              "    }\n",
              "    80% {\n",
              "      border-color: transparent;\n",
              "      border-right-color: var(--fill-color);\n",
              "      border-bottom-color: var(--fill-color);\n",
              "    }\n",
              "    90% {\n",
              "      border-color: transparent;\n",
              "      border-bottom-color: var(--fill-color);\n",
              "    }\n",
              "  }\n",
              "</style>\n",
              "\n",
              "  <script>\n",
              "    async function quickchart(key) {\n",
              "      const quickchartButtonEl =\n",
              "        document.querySelector('#' + key + ' button');\n",
              "      quickchartButtonEl.disabled = true;  // To prevent multiple clicks.\n",
              "      quickchartButtonEl.classList.add('colab-df-spinner');\n",
              "      try {\n",
              "        const charts = await google.colab.kernel.invokeFunction(\n",
              "            'suggestCharts', [key], {});\n",
              "      } catch (error) {\n",
              "        console.error('Error during call to suggestCharts:', error);\n",
              "      }\n",
              "      quickchartButtonEl.classList.remove('colab-df-spinner');\n",
              "      quickchartButtonEl.classList.add('colab-df-quickchart-complete');\n",
              "    }\n",
              "    (() => {\n",
              "      let quickchartButtonEl =\n",
              "        document.querySelector('#df-e3ab1df2-9ffc-4098-ab26-12571e6ac5af button');\n",
              "      quickchartButtonEl.style.display =\n",
              "        google.colab.kernel.accessAllowed ? 'block' : 'none';\n",
              "    })();\n",
              "  </script>\n",
              "</div>\n",
              "    </div>\n",
              "  </div>\n"
            ]
          },
          "metadata": {},
          "execution_count": 12
        }
      ]
    },
    {
      "cell_type": "code",
      "source": [
        "# Save the DataFrame with the added 'sentiment' columns to the Excel file\n",
        "df.to_excel('Reviews Corpus.xlsx')"
      ],
      "metadata": {
        "id": "HvublOQEFb8H"
      },
      "execution_count": null,
      "outputs": []
    }
  ],
  "metadata": {
    "colab": {
      "provenance": []
    },
    "kernelspec": {
      "display_name": "Python 3",
      "name": "python3"
    },
    "language_info": {
      "name": "python"
    }
  },
  "nbformat": 4,
  "nbformat_minor": 0
}